﻿using EFModel;
using IServices;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Y2.Filters;

namespace Y2.Controllers
{
    [LoginFilter]
    public class human_fileGoController : Controller
    {
        private readonly Ihuman_file he;

        public human_fileGoController(Ihuman_file he)
        {
            this.he = he;
        }

        public IActionResult human_fileGo()
        {
            return View();
        }
        public IActionResult human_fileGoInsert(int? id)
        {
            ViewBag.huf_id = id;
            return View();
        }
        //人力资删除查询
        public async Task<IActionResult> QuerG(int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.QuerG(currentPage, pageSize)));
        }
        //人力资源删除模糊查询
        public async Task<IActionResult> QuerG1(human_file _File, int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.QuerG1(_File, currentPage, pageSize)));
        }
    }
}
